-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Actionable Observability] rules page read permissions & snoozed status & no data screen #128108
[Actionable Observability] rules page read permissions & snoozed status & no data screen #128108
Conversation
@elasticmachine merge upstream |
x-pack/plugins/observability/public/pages/rules/components/status_context.tsx
Show resolved
Hide resolved
@XavierM @katrin-freihofner I updated @XavierM Can you send me the ticket of your team with the new snooze api? |
@elasticmachine merge upstream |
That's our PR #128214 and please do not hate me but it looks like that we call it |
@XavierM I renamed to |
I just had a look at your PR. If you expose the I can expose your component, once your PR is merged. I don't want to push for it, since we didn't plan to deliver the new snooze api in the o11y rules page anyway. But if you make it in time, I can squeeze this in o11y as well for 8.2. |
…ation to the use_fetch_rules hook
de225e2
to
b98f947
Compare
@mgiota, I don't know exactly the expected behavior, so I will share this with you However, when I went to the rules pages trying to create an APM Error Count rule, I'm getting the next error And I can click |
That's the plan for 8.3, for 8.2 we were just making it internal. I do think that we should also focus our time to get the rules table re-usable between plugins. Therefore a lot of feature will come available to you for free. It is more work at the beginning but we will be more aligned in the long run. |
@fkanout can you try to replace this |
FYI, I tried the same thing with the same user (apm-all), but on Kibana main branch, the issue is there too (if it's an issue and not missing privileges). 🤔 |
const currentStatus = item.enabled ? RuleStatus.enabled : RuleStatus.disabled; | ||
let currentStatus: RuleStatus; | ||
if (item.enabled) { | ||
currentStatus = item.muteAll ? RuleStatus.snoozed : RuleStatus.enabled; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to have a rule enabled
and muted
at the same time?
I assume snoozed
== muteAll
, right? The API that provides the item
is using muteAll
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fkanout Yep we are using muteAll for the snoozed (indefinitely) state. And yes a rule can be enabled and muted at the same time. I had similar questions here #123580 (comment) and we ended up with @katrin-freihofner on following:
- If it is only enabled the
Enabled
state is shown in the UI - If it is snoozed, then the
Snoozed indefinitely
state is shown in the UI, and yep it is enabled as well. - To unmute/unsnooze user needs to select enabled (behind the scenes it enables and unmutes the rule)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mgiota, excellent explanation, thanks!
snoozed
+ enabled
will keep the rule but it will not generate alerts?
@fkanout For apm it looks like you need to have these predefined roles |
@fkanout I can confirm that everything works fine if you define following according to the predefined roles mentioned here #90806 Without about mentioned predefined roles I get the error you mentioned both in the Stack Management rules page and the o11y rules page. So it is no problem with the code, but as you correctly guessed missing privileges and indices in the custom role configuration. |
@XavierM I totally agree. The two hooks I already created (use_fetch_rules and use_load_rule_types) are moving towards this direction. I already have a plan in my mind. After feature freeze and once we prioritize with the team, I can start working towards this direction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved changes in triggersActionUi
plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just need to green the CI.
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @mgiota |
Fixes #123585 -> must have for 8.2
Fixes #127434 -> must have for 8.2 (this depends on #123585, so it had to be pushed in this open PR)
Fixes #127583 -> nice to have (this depends on #123585, so it had to be pushed in this open PR)
Acceptance criteria
Snoozed permanently
Snoozed indefinitely
status is added to the status columnBefore
After
Authorized user
Unauthorized user
cc @katrin-freihofner